package com.information.manage.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.information.manage.basic.model.entity.StaffDO;
import com.information.manage.basic.model.vo.StaffExportVO;
import com.information.manage.basic.model.vo.StaffNameAndJobNumberVO;
import com.information.manage.basic.model.vo.StaffPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sy
 * @since 2021-12-29
 */
@Mapper
public interface StaffMapper extends BaseMapper<StaffDO> {

    /**
     * 分页查询员工
     * @param combination 姓名或者工号
     * @param isFingerprint 是否录入指纹
     * @param staffIds 某个部门下的所有员工id
     * @return
     */
    Page<StaffPageVO> queryStaffPage(Page page, @Param("combination") String combination, @Param("isFingerprint") Boolean isFingerprint, @Param("staffIds") List<Integer> staffIds);

    /**
     * 查询员工list
     * @param combination 姓名或者工号
     * @param isFingerprint 是否录入指纹
     * @param staffIds 某个部门下的所有员工id
     * @return
     */
    List<StaffExportVO> queryStaffExportList(@Param("combination") String combination
            , @Param("isFingerprint") Boolean isFingerprint, @Param("staffIds") List<Integer> staffIds);

    /**
     * 根据姓名或者工号查询员工 模糊匹配
     * @param combination
     * @return
     */
    List<StaffNameAndJobNumberVO> queryStaffByCombination(String combination);

}
